#include<stdio.h>
#include<iostream>
#include<string.h>
const int base=10000;
struct bigint{
    	int d[base];
    	void clear(){ 
		memset(d,0,sizeof(d));
		}
	};
inline bigint operator +(const bigint &a,const bigint &b){
    	bigint c;
    	c.clear();
    	c.d[0]=std::max(a.d[0],b.d[0]);
    	for(int i=1;i<=c.d[0];i++){
        c.d[i]+=a.d[i]+b.d[i];
        c.d[i+1]=c.d[i]/base,c.d[i]%=base;
    	}
    if(c.d[c.d[0]+1]) c.d[0]++;
    return c;    
}	
using namespace std;
int main(){
	

	unsigned long long floor[5001];
	int n;
	cin>>n;
	floor[1]=1;floor[2]=2;
	if(n<3) cout<<floor[n];
	else{
		for(int i=3;i<n+1;i++){
			floor[i]=floor[i-1]+floor[i-2];
		}
		cout<<floor[n];
	}
	return 0;
}


